﻿using System.Net;

namespace WebSocket.Common
{
    public class ListenIPAddress
    {
        private int _Port;
        private string _IPStr;

        public ListenIPAddress()
        {
            _Port = 8090;
            _IPStr = "127.0.0.1";
        }
        public ListenIPAddress(int Port, string IPAddress)
        {
            _Port = Port;
            _IPStr = IPAddress;
        }

        public IPEndPoint GetIPEndPoint()
        {
            IPAddress IPAdr = IPAddress.Parse(_IPStr);
            IPEndPoint ipEndPoint = new IPEndPoint(IPAdr, _Port);
            return ipEndPoint;
        }
    }
}
